package com.ricky04.health;

import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

/**
 * Created by bgt on 2018/5/5.
 *
 * 引入依赖 actuator
 *http://localhost/actuator/health
 */
@Component
public class MyHealth implements HealthIndicator {
    @Override
    public Health health() {
        System.out.println("----------------------");
        return Health.up().withDetail("name","ricky").build();
    }
}
